$(function () {
//mudidi
    $("#neiyeMdd").hover(function () {
        $(this).find(".ny_mdd").show();
    }, function () {
        $(this).find(".ny_mdd").hide();
    });


    if (document.getElementById("chanpin_nav")) {
        var sfEls = document.getElementById("chanpin_nav").getElementsByTagName("dt");
        for (var i = 0; i < sfEls.length; i++) {
            sfEls[i].onmouseover = function () {
                this.className += (this.className.length > 0 ? " " : "") + "sfhover";
            }
            sfEls[i].onmouseout = function () {
                this.className = this.className.replace(new RegExp("( ?|^)sfhover\\b"),
                        "");
            }
        }
    }


    //判断登录
    if ($.cookie('uid') > 0) {
        var username = $.cookie('username');
        var html =
                '<a href="' + url1 + '" target="_blank" rel="nofollow" >欢迎您，' + username + '</a>' +
                '<span>|</span>' +
                '<a href="' + url1 + '" target="_blank" rel="nofollow" >个人中心</a>' +
                '<span>|</span>' +
                '<a href="' + url2 + '" rel="nofollow" >退出</a>';
        $("#topLogin").html(html);
    } else {
        var html =
                '<a href="' + url + '" target="_blank" class="log"><em></em>登陆</a>' +
                '<span>|</span>' +
                '<a href="' + url3 + '" target="_blank" class="reg"><em></em>注册</a>';
        $("#topLogin").html(html);
    }
});